import request from '@/utils/request'

// 查询商铺信息列表
export function listShops(query) {
  return request({
    url: '/asset/shops/list',
    method: 'get',
    params: query
  })
}

// 查询商铺信息详细
export function getShops(id) {
  return request({
    url: '/asset/shops/' + id,
    method: 'get'
  })
}

// 查询商铺信息详细
export function getShopsByDid(id) {
  return request({
    url: '/asset/shops/Did/' + id,
    method: 'get'
  })
}

// 查询数量
export function getCount(id) {
  return request({
    url: '/asset/shops/state/' + id,
    method: 'get'
  })
}



// 查询商铺信息详细
export function getShopsByDidAndCode(id,code) {
  return request({
    url: '/asset/shops/DCode/' + id+"/"+code,
    method: 'get'
  })
}

// 新增商铺信息
export function addShops(data) {
  return request({
    url: '/asset/shops',
    method: 'post',
    data: data
  })
}


// 修改商铺信息
export function updateShops(data) {
  return request({
    url: '/asset/shops',
    method: 'put',
    data: data
  })
}

// 删除商铺信息
export function delShops(id) {
  return request({
    url: '/asset/shops/' + id,
    method: 'delete'
  })
}
